package com.ruoyi.service.impl;

import com.ruoyi.domain.BusActivity;
import com.ruoyi.mapper.BusActivityMapper;
import com.ruoyi.service.IBusActivityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 走访活动Service业务层处理
 *
 * @author ruoyi
 * @date 2024-01-30
 */
@Service
public class BusActivityServiceImpl implements IBusActivityService
{
    @Autowired
    private BusActivityMapper busActivityMapper;

    /**
     * 查询走访活动
     *
     * @param busActivityId 走访活动主键
     * @return 走访活动
     */
    @Override
    public BusActivity selectBusActivityByBusActivityId(Long busActivityId)
    {
        return busActivityMapper.selectBusActivityByBusActivityId(busActivityId);
    }

    /**
     * 查询走访活动列表
     *
     * @param busActivity 走访活动
     * @return 走访活动
     */
    @Override
    public List<BusActivity> selectBusActivityList(BusActivity busActivity)
    {
        return busActivityMapper.selectBusActivityList(busActivity);
    }

    /**
     * 新增走访活动
     *
     * @param busActivity 走访活动
     * @return 结果
     */
    @Override
    public int insertBusActivity(BusActivity busActivity)
    {
        return busActivityMapper.insertBusActivity(busActivity);
    }

    /**
     * 修改走访活动
     *
     * @param busActivity 走访活动
     * @return 结果
     */
    @Override
    public int updateBusActivity(BusActivity busActivity)
    {
        return busActivityMapper.updateBusActivity(busActivity);
    }

    /**
     * 批量删除走访活动
     *
     * @param busActivityIds 需要删除的走访活动主键
     * @return 结果
     */
    @Override
    public int deleteBusActivityByBusActivityIds(Long[] busActivityIds)
    {
        return busActivityMapper.deleteBusActivityByBusActivityIds(busActivityIds);
    }

    /**
     * 删除走访活动信息
     *
     * @param busActivityId 走访活动主键
     * @return 结果
     */
    @Override
    public int deleteBusActivityByBusActivityId(Long busActivityId)
    {
        return busActivityMapper.deleteBusActivityByBusActivityId(busActivityId);
    }
}
